
import { http } from '../utils/request'

// 账本表 API 模块

const setPage = (pageNo ?: string, pageSize ?: string) => {
	return `?pageNo=${pageNo || 1}&pageSize=${pageSize || 10}`
}

// 构建带参数的URL
function buildUrlWithParams(baseUrl, params) {
	const queryString = Object.keys(params)
		.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
		.join('&');

	return `${baseUrl}?${queryString}`;
}

//  账本表
const accountBookApi = {
	// TODO 封面图片是可以多个备选
	/**
	 * 账本表-新增
	 * @param createTime - 创建日期 [可选]
	 * @param defaulted - 默认(1:是  0:否) [可选]
	 * @param file - file [可选]
	 * @param generalIncome - 总收入 [可选]
	 * @param id - id [可选]
	 * @param img - 封面图片 [可选]
	 * @param name - 账本名称 [可选]
	 * @param remarks - 备注 [可选]
	 * @param sequence - 账本顺序 [可选]
	 * @param sumPen - 累计笔数 [可选]
	 * @param totalExpenditure - 总支出 [可选]
	 */
	addUsingPOST: (queryParams : any) => {
		const finalUrl = '/accountBook/add';
		return http.post/* postFormDataUploadFile */(finalUrl, queryParams);
	},

	// OK
	/**
	 * 账本表-删除
	 * @param ids - ids [必填]
	 */
	deleteUsingGET: (queryParams : any) => {
		const finalUrl = '/accountBook/delete';
		return http.get(finalUrl, queryParams);
	},
	// OK
	/**
	 * 账本表-分页查询
	 * @param accountBook - accountBook [必填]
	 * @param date - 年月日(账单的日期)，默认无条件 [可选]
	 * @param deleted - 默认查询未删除 [可选]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST: (queryParams : any) => {
		const finalUrl = '/accountBook/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize), queryParams);
	},

	// ING
	/**
	 * 账本表-查询明细
	 * @param accountBookId - 账本id [可选]
	 * @param condition - 查询条件 （搜索支出/时间/备注） [可选]
	 * @param date - 年月日 [可选]
	 * @param deleted - 默认查询未删除 [可选]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPagesUsingGET: (queryParams : any) => {
		const finalUrl = '/accountBook/queryPages';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 账本表-修改数据
	 * @param createTime - 创建日期 [可选]
	 * @param defaulted - 默认(1:是  0:否) [可选]
	 * @param file - file [可选]
	 * @param generalIncome - 总收入 [可选]
	 * @param id - id [可选]
	 * @param img - 封面图片 [可选]
	 * @param name - 账本名称 [可选]
	 * @param remarks - 备注 [可选]
	 * @param sequence - 账本顺序 [可选]
	 * @param sumPen - 累计笔数 [可选]
	 * @param totalExpenditure - 总支出 [可选]
	 */
	updateUsingPOST: (queryParams : any) => {
		return http.post('/accountBook/update', queryParams);
	},
	// OK
	/**
	 * 账本表-修改默认
	 * @param createTime - 创建日期 [可选]
	 * @param defaulted - 默认(1:是  0:否) [可选]
	 * @param generalIncome - 总收入 [可选]
	 * @param id - id [可选]
	 * @param img - 封面图片 [可选]
	 * @param name - 账本名称 [可选]
	 * @param remarks - 备注 [可选]
	 * @param sequence - 账本顺序 [可选]
	 * @param sumPen - 累计笔数 [可选]
	 * @param totalExpenditure - 总支出 [可选]
	 */
	updateDefaultedUsingPOST: (queryParams : any) => {
		const finalUrl = '/accountBook/updateDefaulted';
		return http.postWWWForm(finalUrl, queryParams);
	},


	/**
	 * 账本表-修改顺序
	 * @param accountBook - accountBook [必填]
	 */
	updateSequenceUsingPOST: (queryParams : any) => {
		const finalUrl = '/accountBook/updateSequence';
		return http.post(finalUrl, queryParams);
	}
};


// 资产表 API 模块
const assetsApi = {
	// ING
	/**
	 * 资产表-新增
	 * @param assets - assets [必填]
	 */
	addUsingPOST_2: (queryParams : any) => {
		const finalUrl = '/assets/add';
		return http.post(finalUrl, queryParams);
	},
	/**
	 * 资产表-超支警告
	 * @param userId - userId [可选]
	 */
	alertUsingGET: (queryParams : any) => {
		const finalUrl = '/assets/alert';
		return http.get(finalUrl, queryParams);
	},
	//  OK
	/**
	 * 资产表-查询总资产和总负债
	 * @param assets - assets [必填]
	 */
	queryUsingPOST: (queryParams : any) => {
		const finalUrl = '/assets/query';
		return http.post(finalUrl, queryParams);
	},

	// OK
	/**
	 * 资产表-分页查询
	 * @param assets - assets [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_2: (queryParams : any) => {
		const finalUrl = '/assets/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageS
		), queryParams);
	},
	// OK

	/**
	 * 资产表明细-查询明细
	 * @param assetsId - 资产表id [可选]
	 * @param date - 年月日 [可选]
	 * @param deleted - 逻辑删除,默认查询未删除 [可选]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageSUsingGET: (queryParams : any) => {
		const finalUrl = '/assets/queryPageS';
		return http.get(finalUrl, queryParams);
	},
	// OK
	/**
	 * 资产表明细-查询支出和收入
	 * @param assetsId - 资产表id [必填]
	 * @param date - 年月日 [必填]
	 * @param deleted - 逻辑删除,默认查询未删除 [可选]
	 */
	querySUsingGET: (queryParams : any) => {
		const finalUrl = '/assets/queryS';
		return http.get(finalUrl, queryParams);
	},
	/**
	 * 资产表-修改
	 * @param accountName - 账户名称 [可选]
	 * @param balance - balance [可选]
	 * @param bankName - 银行名称 [可选]
	 * @param categoryId - categoryId [可选]
	 * @param categoryName - 资产类别名称 [可选]
	 * @param createTime - createTime [可选]
	 * @param id - id [可选]
	 * @param remarks - 备注 [可选]
	 * @param updateTime - updateTime [可选]
	 * @param userId - userId [可选]
	 */
	updateUsingPUT_1: (queryParams : any) => {
		const finalUrl = '/assets/update';
		return http.put(finalUrl, queryParams);
	},
	// 资产表- 删除

	/**
	 * 支出账本-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE: (queryParams : any) => {
		const finalUrl = '/assets/deleteByIds?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	},
};



// 资产类别表 API 模块
const assetsCategoriesApi = {

	// TODO 1.没有 大分类字段,如	：资产账户，信用账户充值账户等大标题，2.没有图标字段
	/**
	 * 资产类别表-新增
	 * @param assetsCategories - assetsCategories [必填]
	 */
	addUsingPOST_1: (queryParams : any) => {
		const finalUrl = '/assetsCategories/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 资产类别表-删除
	 * @param id - id [可选]
	 */
	deleteUsingPUT: (queryParams : any) => {
		const finalUrl = '/assetsCategories/delete';
		return http.put(finalUrl, queryParams);
	},

	// TODO 请求失败  500
	/**
	 * 资产类别表-分页查询
	 * @param assetsCategories - assetsCategories [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_1: (queryParams : any) => {
		const finalUrl = '/assetsCategories/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize), queryParams);
	},
	/**
	 * 资产类别表-修改
	 * @param assetsCategories - assetsCategories [必填]
	 */
	updateUsingPUT: (queryParams : any) => {
		const finalUrl = '/assetsCategories/update';
		return http.put(finalUrl, queryParams);
	}
};

// 日历 API 模块

const calendarApi = {
	// OK
	/**
	 * 日历-查询月收入和支出
	 * @param accountBookId - 账本id [必填]
	 * @param date - 年月日 [可选]
	 * @param deleted - 逻辑删除,默认查询未删除 [可选]
	 */
	queryUsingGET: (queryParams : any) => {
		const finalUrl = '/calendar/query';
		return http.get(finalUrl, queryParams);
	},
	// TODO 和  账本表-查询明细 /accountBook/queryPages都是查询收入支出明细  接口重复？
	/**
	 * 	日历-分页查询
	 * @param accountBookId - 账本id [必填]
	 * @param date - 年月日 或 年月 [必填]
	 * @param deleted - 逻辑删除,默认查询未删除 [可选]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingGET: (queryParams : any) => {
		const finalUrl = '/calendar/queryPage';
		return http.get(finalUrl, queryParams);
	}
};



// 支出项目表 API 模块

const expenditureItemApi = {


	/**
	 * 支出项目表-新增
	 * @param expenditureItem - expenditureItem [必填]
	 */
	addUsingPOST_3: (queryParams : any) => {
		const finalUrl = '/expenditureItem/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 支出项目表-Excel导出
	 * @param idList - idList [可选]
	 */
	textExportUsingGET: (queryParams : any) => {
		const finalUrl = '/expenditureItem/exportExcel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 支出项目表-Excel导出样板
	 */
	exportExcelUsingGET: (queryParams : any) => {
		const finalUrl = '/expenditureItem/exportExcelModel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 支出项目表-Excel导入
	 * @param file - file [必填]
	 */
	importExcelUsingPOST: (queryParams : any) => {
		const finalUrl = '/expenditureItem/importExcel';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 支出项目表-分页查询
	 * @param expenditureItem - expenditureItem [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_3: (queryParams : any) => {
		const finalUrl = '/expenditureItem/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize), queryParams);
	},

	/**
	 * 支出项目表-修改
	 * @param expenditureItem - expenditureItem [必填]
	 */
	updateUsingPUT_2: (queryParams : any) => {
		const finalUrl = '/expenditureItem/update';
		return http.put(finalUrl, queryParams);
	},
	/**
	 * 支出项目表-删除
	 * @param idList - idList
	 */
	deleteByIdsUsingDELETE_1: (queryParams : any) => {
		const finalUrl = '/expenditureItem/deleteByIds?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	},
};


// 支出账本 API 模块

const expenditureLedgerApi = {

	/**
	 * 支出账本-新增
	 * @param expenditureLedger - expenditureLedger [必填]
	 */
	/* 
	 {
		 "accountBookId": "",
		 "accounting": "",
		 "assetsId": "",
		 "deleted": "",
		 "deletedTime": "",
		 "expenditureAmount": "",
		 "expenditureItem": "",
		 "expenditureItemId": "",
		 "expenditureTime": "",
		 "expenditureType": "",
		 "id": "",
		 "invoiceStatus": "",
		 "params": {},
		 "quantity": "",
		 "remarks": "",
		 "unitPrice": "",
		 "userId": ""
	 }
	 */
	addUsingPOST_4: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 支出账本-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/deleteByIds?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-Excel导出
	 * @param idList - idList [可选]
	 */
	textExportUsingGET_1: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/exportExcel';
		return http.get(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-Excel导出样板
	 */
	exportExcelUsingGET_1: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/exportExcelModel';
		return http.get(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-Excel导入
	 * @param file - file [必填]
	 */
	importExcelUsingPOST_1: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/importExcel';
		return http.post(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-(未开票||已开票)
	 * @param ids - ids [必填]
	 * @param invoiceState - 未开票、已开票 [必填]
	 */
	statusUsingGET: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/invoiceStatus';
		return http.get(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-分页查询
	 * @param expenditureLedger - expenditureLedger [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_4: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/queryPage';
		return http.post(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 支出账本-撤销删除
	 * @param idList - idList [必填]
	 */
	undoDeleteUsingDELETE: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/undoDelete';
		return http.delete(finalUrl, queryParams);
	},
	/**
	 * 支出账本-修改
	 * @param
	 */
	updateUsingPUT_3: (queryParams : any) => {
		const finalUrl = '/expenditureLedger/update';
		return http.put(finalUrl, queryParams);
	},

};



// 获取编号 API 模块

const generateUniqueCodeApi = {
	// 没调用
	/**
	 * 获取编号
	 * @param prdfix - prdfix [可选]
	 */
	generateUniqueCodeUsingGET: (queryParams : any) => {
		const finalUrl = '/generateUniqueCode';
		return http.get(finalUrl, queryParams);
	}
};

// 收入项目表 API 模块

const incomeItemApi = {
	/**
	 * 收入项目表-新增
	 * @param incomeItem - incomeItem [必填]
	 */
	addUsingPOST_5: (queryParams : any) => {
		const finalUrl = '/incomeItem/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收入项目表-Excel导出
	 * @param idList - idList [可选]
	 */
	textExportUsingGET_2: (queryParams : any) => {
		const finalUrl = '/incomeItem/exportExcel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 收入项目表-Excel导出样板
	 */
	exportExcelUsingGET_2: (queryParams : any) => {
		const finalUrl = '/incomeItem/exportExcelModel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 收入项目表-Excel导入
	 * @param file - file [必填]
	 */
	importExcelUsingPOST_2: (queryParams : any) => {
		const finalUrl = '/incomeItem/importExcel';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收入项目表-分页查询
	 * @param incomeItem - incomeItem [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_5: (queryParams : any) => {
		const finalUrl = '/incomeItem/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize), queryParams);
	},

	/**
	 * 收入项目表-修改
	 * @param incomeItem - incomeItem [必填]
	 */
	updateUsingPUT_3: (queryParams : any) => {
		const finalUrl = '/incomeItem/update';
		return http.put(finalUrl, queryParams);
	},


	/**
	 * 收入项目表-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_3: (queryParams : any) => {
		const finalUrl = '/incomeItem/deleteByIds?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	}
};

// 收入账本 API 模块

const incomeLedgerApi = {
	// ING
	/*
	{ "accountBookId": "",
	   "accounting": "",
	   "assetsId": "",
	   "deleted": "",
	   "deletedTime": "",
	   "id": "",
	   "incomeAmount": "",
	   "incomeItem": "",
	   "incomeItemId": "",
	   "incomeTime": "",
	   "incomeType": "",
	   "invoiceStatus": "",
	   "params": {},
	   "quantity": "",
	   "remarks": "",
	   "unitPrice": "",
	   "userId": ""}
	 */
	/**
	 * 收入账本-新增
	 * @param incomeLedger - incomeLedger [必填]
	 */
	addUsingPOST_6: (queryParams : any) => {
		const finalUrl = '/incomeLedger/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收入账本-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_1: (queryParams : any) => {
		const finalUrl = '/incomeLedger/deleteByIds?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 收入账本-Excel导出
	 * @param idList - idList [可选]
	 */
	textExportUsingGET_3: (queryParams : any) => {
		const finalUrl = '/incomeLedger/exportExcel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 收入账本-Excel导出样板
	 */
	exportExcelUsingGET_3: (queryParams : any) => {
		const finalUrl = '/incomeLedger/exportExcelModel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 收入账本-Excel导入
	 * @param file - file [必填]
	 */
	importExcelUsingPOST_3: (queryParams : any) => {
		const finalUrl = '/incomeLedger/importExcel';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收入账本-(未开票||已开票)
	 * @param ids - ids [必填]
	 * @param invoiceState - 未开票、已开票 [必填]
	 */
	statusUsingGET_1: (queryParams : any) => {
		const finalUrl = '/incomeLedger/invoiceStatus';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 收入账本-分页查询
	 * @param incomeLedger - incomeLedger [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_6: (queryParams : any) => {
		const finalUrl = '/incomeLedger/queryPage';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收入账本-撤销删除
	 * @param idList - idList [必填]
	 */
	undoDeleteUsingDELETE_1: (queryParams : any) => {
		const finalUrl = '/incomeLedger/undoDelete';
		return http.delete(finalUrl, queryParams);
	}, updateUsingPUT_5: (queryParams : any) => {
		const finalUrl = '/incomeLedger/update';
		return http.put(finalUrl, queryParams);
	},
};

// 登录 API 模块
const loginApi = {
	// OK
	/**
	 * 退出登陆
	 * @param sysUserId - sysUserId [可选]
	 */
	dropOutUsingGET: (queryParams : any) => {
		const finalUrl = '/login/dropOut';
		return http.get(finalUrl, queryParams);
	},
	// OK
	/**
	 * 登录
	 * @param sysUser - sysUser [必填]
	 */
	zhuCheUsingPOST: (queryParams : any) => {
		const finalUrl = '/login/login';
		return http.post(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 自动登录
	 * @param sysUser - sysUser [必填]
	 */
	loginSelfMotionUsingPOST: (queryParams : any) => {
		const finalUrl = '/login/loginSelfMotion';
		return http.post(finalUrl, queryParams);
	},
	// 没调用
	/**
	 * 注册账号
	 * @param sysUser - sysUser [必填]
	 */
	registerUsingPOST: (queryParams : any) => {
		const finalUrl = '/login/register';
		return http.post(finalUrl, queryParams);
	}
};


// 记事本分类 API 模块
const noteCategoriesApi = {
	/**
	 * 记事本-新增
	 * @param noteCategories - noteCategories [必填]
	 */
	addUsingPOST_7: (queryParams : any) => {
		const finalUrl = '/noteCategories/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 记事本-批量删除
	 * @param ids - ids [必填]
	 */
	updateUsingDELETE: (queryParams : any) => {
		const finalUrl = '/noteCategories/delete?ids=' + queryParams.ids;
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 便签分类表-Excel导出
	 * @param idList - idList [可选]
	 */
	textExportUsingGET_4: (queryParams : any) => {
		const finalUrl = '/noteCategories/exportExcel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 便签分类表-Excel导出样板
	 */
	exportExcelUsingGET_4: (queryParams : any) => {
		const finalUrl = '/noteCategories/exportExcelModel';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 便签分类表-Excel导入
	 * @param file - file [必填]
	 */
	importExcelUsingPOST_4: (queryParams : any) => {
		const finalUrl = '/noteCategories/importExcel';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 记事本-分页查询
	 * @param noteCategories - noteCategories [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_7: (queryParams : any) => {
		const finalUrl = '/noteCategories/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize || 20), queryParams);
	},

	/**
	 * 记事本-修改
	 * @param noteCategories - noteCategories [必填]
	 */
	updateUsingPUT_4: (queryParams : any) => {
		const finalUrl = '/noteCategories/update';
		return http.put(finalUrl, queryParams);
	}
};

/* 通用 */
const universalApi = {

	/**
	 * 文件处理-上传
	 * @param  
	 */
	uploadUsingPOST: (queryParams : any, filePath : string) => {
		const finalUrl = '/universal/upload';
		return http.uploadFile(finalUrl, filePath, queryParams);
	},
}

// 记事本 API 模块

const notesApi = {

	/**
	 * 记事本-新增
	 * @param accountBookId - 关联账本id [可选]
	 * @param content - content [可选]
	 * @param createTime - createTime [可选]
	 * @param id - id [可选]
	 * @param imageFiles - imageFiles [可选]
	 * @param noteCategoryId - noteCategoryId [可选]
	 * @param title - title [可选]
	 * @param type - 是否来自缓存(1:是 0:否) [可选]
	 * @param updateTime - updateTime [可选]
	 * @param userId - userId [可选]
	 * @param videoFiles - videoFiles [可选]
	 */
	addUsingPOST_8: (queryParams : any) => {
		const finalUrl = '/notes/add?type=' + queryParams.type;
		return http.post(finalUrl, queryParams);
	},
	// ING
	/**
	 * 记事本-临时新增
	 * @param accountBookId - 关联账本id [可选]
	 * @param content - content [可选]
	 * @param createTime - createTime [可选]
	 * @param id - id [可选]
	 * @param imageFiles - imageFiles [可选]
	 * @param noteCategoryId - noteCategoryId [可选]
	 * @param title - title [可选]
	 * @param updateTime - updateTime [可选]
	 * @param userId - userId [可选]
	 * @param videoFiles - videoFiles [可选]
	 */
	addTemporaryUsingPOST: (queryParams : any) => {
		const finalUrl = '/notes/addTemporary';
		return http.postFormData(finalUrl, queryParams);
	},
	// OK
	/**
	 * 记事本-删除
	 * @param idList - idList [必填]
	 */
	deleteUsingDELETE: (queryParams : any) => {
		const finalUrl = '/notes/delete?idList=' + queryParams.idList;
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 记事本-单个查询
	 * @param id - id [可选]
	 */
	queryOneUsingPOST: (queryParams : any) => {
		const finalUrl = '/notes/queryOne';
		return http.post(finalUrl, queryParams);
	},
	// ING
	/**
	 * 记事本-分页查询
	 * @param notesDto - notesDto [必填]
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 */
	queryPageUsingPOST_8: (queryParams : any) => {
		const finalUrl = '/notes/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize || 20), queryParams);
	},
	// ING
	/**
	 * 记事本-查询临时新增
	 * @param accountBookId - 关联账本id [可选]
	 * @param content - content [可选]
	 * @param createTime - createTime [可选]
	 * @param id - id [可选]
	 * @param imageFiles - imageFiles [可选]
	 * @param noteCategoryId - noteCategoryId [可选]
	 * @param title - title [可选]
	 * @param updateTime - updateTime [可选]
	 * @param userId - userId [可选]
	 * @param videoFiles - videoFiles [可选]
	 */
	queryTemporaryUsingGET: (queryParams : any) => {
		const finalUrl = '/notes/queryTemporary';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 记事本-修改
	 * @param imageFiles - imageFiles [可选]
	 * @param notes.accountBookId - 关联账本id [可选]
	 * @param notes.content - notes.content [可选]
	 * @param notes.createTime - notes.createTime [可选]
	 * @param notes.id - notes.id [可选]
	 * @param notes.noteCategoryId - notes.noteCategoryId [可选]
	 * @param notes.title - notes.title [可选]
	 * @param notes.updateTime - notes.updateTime [可选]
	 * @param notes.userId - notes.userId [可选]
	 * @param notesF.fileUrl - notesF.fileUrl [可选]
	 * @param notesF.id - notesF.id [可选]
	 * @param notesF.notesId - notesF.notesId [可选]
	 * @param notesF.type - notesF.type [可选]
	 * @param type - type [可选]
	 * @param videoFiles - videoFiles [可选]
	 */
	updateUsingPUT_5: (queryParams : any) => {
		const finalUrl = '/notes/update';
		return http.put(finalUrl, queryParams);
	}
};


// 产品分类 API 模块

const productCategoriesApi = {

	// OK
	/**
	 * 产品分类-新增
	 * @param productCategories - productCategories [必填]
	 */
	addUsingPOST_9: (queryParams : any) => {
		const finalUrl = '/productCategories/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 产品分类-删除
	 * @param idList - idList [必填]
	 */
	deleteUsingDELETE_1: (queryParams : any) => {
		const finalUrl = '/productCategories/delete';
		return http.delete(finalUrl, queryParams);
	},
	// OK
	/**
	 * 产品分类-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param productCategories - productCategories [必填]
	 */
	queryPageUsingPOST_9: (queryParams : any) => {
		const finalUrl = '/productCategories/queryPage';
		return http.post(finalUrl + setPage(queryParams.pageNo, queryParams.pageSize || 20), queryParams);
	},

	/**
	 * 产品分类-修改
	 * @param productCategories - productCategories [必填]
	 */
	updateUsingPUT_6: (queryParams : any) => {
		const finalUrl = '/productCategories/update';
		return http.put(finalUrl, queryParams);
	}
};




// 产品介绍 API 模块

const productDescriptionsApi = {
	/**
	 * 产品介绍-新增
	 * @param categoryId - categoryId [可选]
	 * @param createTime - createTime [可选]
	 * @param description - description [可选]
	 * @param id - id [可选]
	 * @param imageFiles - imageFiles [可选]
	 * @param images - images [可选]
	 * @param productId - productId [可选]
	 * @param productName - productName [可选]
	 * @param videoFiles - videoFiles [可选]
	 * @param videos - videos [可选]
	 */
	addUsingPOST_10: (queryParams : any) => {
		const finalUrl = '/productDescriptions/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 产品介绍-删除
	 * @param idList - idList [必填]
	 */
	deleteUsingDELETE_2: (queryParams : any) => {
		const finalUrl = '/productDescriptions/delete';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 产品介绍-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param productDescriptions - productDescriptions [必填]
	 */
	queryPageUsingPOST_10: (queryParams : any) => {
		const finalUrl = '/productDescriptions/queryPage';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 产品介绍-修改
	 * @param categoryId - categoryId [可选]
	 * @param createTime - createTime [可选]
	 * @param description - description [可选]
	 * @param id - id [可选]
	 * @param imageFiles - imageFiles [可选]
	 * @param images - images [可选]
	 * @param productId - productId [可选]
	 * @param productName - productName [可选]
	 * @param videoFiles - videoFiles [可选]
	 * @param videos - videos [可选]
	 */
	updateUsingPUT_7: (queryParams : any) => {
		const finalUrl = '/productDescriptions/update';
		return http.put(finalUrl, queryParams);
	}
};


// 收件信息表 API 模块

const recipientInformationApi = {
	/**
	 * 收件信息表-新增
	 * @param recipientInformation - recipientInformation [必填]
	 */
	addUsingPOST_11: (queryParams : any) => {
		const finalUrl = '/recipientInformation/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收件信息表-删除
	 * @param idList - idList [必填]
	 */
	deleteUsingDELETE_3: (queryParams : any) => {
		const finalUrl = '/recipientInformation/delete';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 收件信息表-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param recipientInformation - recipientInformation [必填]
	 */
	queryPageUsingPOST_11: (queryParams : any) => {
		const finalUrl = '/recipientInformation/queryPage';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 收件信息表-修改
	 * @param recipientInformation - recipientInformation [必填]
	 */
	updateUsingPUT_8: (queryParams : any) => {
		const finalUrl = '/recipientInformation/update';
		return http.put(finalUrl, queryParams);
	}
};

// 报表 API 模块


const reportFormsApi = {
	/**
	 * 报表-支出查询
	 * @param accountBookId - 账本id [可选]
	 * @param date - 年月日 [可选]
	 */
	queryPageUsingPOST_12: (queryParams : any) => {
		const finalUrl = '/reportForms/queryPage';
		return http.postWWWForm(finalUrl, queryParams);
	},

	/**
	 * 报表-收入查询
	 * @param accountBookId - 账本id [可选]
	 * @param date - 年月日 [可选]
	 */
	queryPageIncomeUsingPOST: (queryParams : any) => {
		const finalUrl = '/reportForms/queryPageIncome';
		return http.postWWWForm(finalUrl, queryParams);
	}
};

// 角色表 API 模块

const sysRoleApi = {
	/**
	 * 角色表-新增
	 * @param sysRole - sysRole [必填]
	 */
	addUsingPOST_12: (queryParams : any) => {
		const finalUrl = '/sysRole/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 角色表-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_2: (queryParams : any) => {
		const finalUrl = '/sysRole/deleteByIds';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 角色表-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param sysRole - sysRole [必填]
	 */
	queryPageUsingPOST_13: (queryParams : any) => {
		const finalUrl = '/sysRole/queryPage';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 角色表-修改
	 * @param sysRole - sysRole [必填]
	 */
	updateUsingPUT_9: (queryParams : any) => {
		const finalUrl = '/sysRole/update';
		return http.put(finalUrl, queryParams);
	}
};

// 用户表 API 模块

const sysUserApi = {
	/**
	 * 用户表-新增
	 * @param sysUser - sysUser [必填]
	 */
	addUsingPOST_13: (queryParams : any) => {
		const finalUrl = '/sysUser/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 用户表-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_3: (queryParams : any) => {
		const finalUrl = '/sysUser/deleteByIds';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 获取表的字段顺序和名称
	 * @param tableName - tableName [必填]
	 */
	deleteByIdsUsingGET: (queryParams : any) => {
		const finalUrl = '/sysUser/getTableColumns';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 用户表-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param sysUser - sysUser [必填]
	 */
	queryPageUsingPOST_14: (queryParams : any) => {
		const finalUrl = '/sysUser/queryPage';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 用户表-待审核查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param sysUser - sysUser [必填]
	 */
	queryPageStatusUsingPOST: (queryParams : any) => {
		const finalUrl = '/sysUser/queryPageStatus';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 用户表-(待审核||已激活)
	 * @param ids - ids [必填]
	 * @param state - 待审核、已激活 [必填]
	 */
	statusUsingGET_2: (queryParams : any) => {
		const finalUrl = '/sysUser/status';
		return http.get(finalUrl, queryParams);
	},

	/**
	 * 用户表-修改
	 * @param sysUser - sysUser [必填]
	 */
	updateUsingPUT_10: (queryParams : any) => {
		const finalUrl = '/sysUser/update';
		return http.put(finalUrl, queryParams);
	}
};


// 个人名片 API 模块

const sysUserInfoApi = {
	/**
	 * 个人名片-新增
	 * @param sysUserInfo - sysUserInfo [必填]
	 */
	addUsingPOST_14: (queryParams : any) => {
		const finalUrl = '/sysUserInfo/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 个人名片-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_4: (queryParams : any) => {
		const finalUrl = '/sysUserInfo/deleteByIds';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 个人名片-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param sysUserInfo - sysUserInfo [必填]
	 */
	queryPageListUsingPOST: (queryParams : any) => {
		const finalUrl = '/sysUserInfo/list';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 个人名片-修改
	 * @param sysUserInfo - sysUserInfo [必填]
	 */
	updateUsingPUT_11: (queryParams : any) => {
		const finalUrl = '/sysUserInfo/update';
		return http.put(finalUrl, queryParams);
	}
};


// 用户角色中间表 API 模块

const sysUserRoleApi = {
	/**
	 * 用户角色中间表-新增
	 * @param sysUserRole - sysUserRole [必填]
	 */
	addUsingPOST_15: (queryParams : any) => {
		const finalUrl = '/sysUserRole/add';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 用户角色中间表-删除
	 * @param idList - idList [必填]
	 */
	deleteByIdsUsingDELETE_5: (queryParams : any) => {
		const finalUrl = '/sysUserRole/deleteByIds';
		return http.delete(finalUrl, queryParams);
	},

	/**
	 * 用户角色中间表-分页查询
	 * @param pageNo - pageNo [可选]
	 * @param pageSize - pageSize [可选]
	 * @param sysUserRole - sysUserRole [必填]
	 */
	queryPageListUsingPOST_1: (queryParams : any) => {
		const finalUrl = '/sysUserRole/list';
		return http.post(finalUrl, queryParams);
	},

	/**
	 * 用户角色中间表-修改
	 * @param sysUserRole - sysUserRole [必填]
	 */
	updateUsingPUT_12: (queryParams : any) => {
		const finalUrl = '/sysUserRole/update';
		return http.put(finalUrl, queryParams);
	}
};

export {
	accountBookApi, assetsApi, assetsCategoriesApi,
	calendarApi, expenditureItemApi, expenditureLedgerApi,
	generateUniqueCodeApi, incomeItemApi, incomeLedgerApi, loginApi, noteCategoriesApi, universalApi
	, notesApi, productCategoriesApi, productDescriptionsApi, recipientInformationApi, reportFormsApi
	, sysRoleApi, sysUserApi, sysUserInfoApi,
	sysUserRoleApi,
}